<style>
    .grid-demo {
        height: 150px;
    }

    .hide-info {
        display: flex;
        align-items: center;
        border: 1px dashed #eee;
        width: 60%;
        padding: 2px;
        margin-bottom: 5px;
        justify-content: space-between;
    }

    .hide-info img {
        width: 25px;
        height: 25px;
    }

    .demand-file {
        font-size: 12px;
        color: #515a6e;
        cursor: pointer;
        margin-bottom: -1px;
    }

    .hide-info-right {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .hide-info-left {
        display: flex;
        align-items: flex-end;
    }

    .hide-info-right span {
        margin-right: 5px;
        cursor: pointer;
    }

    .upload-builder-file {
        font-size: 12px;
        text-decoration: underline;
        line-height: 36px;
        cursor: pointer
    }

    .layui-text-em {
        font-size: 12px;
    }
</style>

<div style="display: flex;flex-direction: column;justify-content: center">
    <div class="del-wrap packing">
        <?php if(isset($info) && !empty($info) && $info[$form['field']]){;?>

        {foreach name="$info[$form['field']]" item="items"}
        <?php $item = explode("*",$items);?>
        <div class="hide-info" style="width: 100%">
            <div class="hide-info-left">
                <img src="/index2/format/{$item[2]}.png"/>
                <span class="demand-file">{$item[0]}</span>
            </div>
            <p class="hide-info-right">
                <span class="layui-badge del-file" onclick="delFile($(this))">删除</span>
            </p>
            <input type="hidden" name="{$form['field']}[]" value="{$item[0]}*{$item[1]}*{$item[2]}"/>
        </div>
        {/foreach}
        <?php }?>
    </div>
    <a class="upload-builder-file">上传</a>
</div>
<div class="layui-form-mid layui-text-em">* 支持上传word，excel，zip，rar，pdf，png，jpg等格式文件<br/>*
    支持批量上传
</div>

<input type="hidden" id="builderUploadUrl" value="{$qiNiu.url}"/>
<input type="hidden" id="builderUploadToken" value="{$qiNiu.token}"/>
<input type="hidden" id="builderUploadNickname" value="{$user.nickname}"/>
<div class="progress" style="display: none;">
    <div style="width: 200px;height: 50px;">
        <div style="margin-bottom: 10px;">
            <div><i class="layui-icon layui-icon-loading-1 layui-anim layui-anim-rotate layui-anim-loop"></i>上传中....
            </div>
        </div>
        <div class="layui-progress" lay-filter="progress">
            <div class="layui-progress-bar" lay-percent="0%"></div>
        </div>
    </div>
</div>
<script id="uploadsPacking" type="text/html">

    <div class="hide-info"  style="width: 100%">
        <div class="hide-info-left">
            <img src="/index2/format/{{d.format}}.png"/>
            <span class="demand-file">{{d.name}}</span>
        </div>
        <p class="hide-info-right">
            <span class="layui-badge del-file" onclick="delFile($(this))">删除</span>
        </p>

        <input type="hidden" name="{$form['field']}[]" value="{{d.name}}*{{d.key}}*{{d.format}}"/>
    </div>

</script>
<script>
    function delFile(that){
        that.parents('.hide-info').remove();
    }
</script>